import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_coupon",{schema:"nest-mall" } )
export class MallCoupon {

    @PrimaryGeneratedColumn({
        type:"smallint", 
        name:"id"
        })
    id:number;
        

    @Column("varchar",{ 
        nullable:true,
        length:60,
        name:"name"
        })
    name:string | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"type_money"
        })
    typeMoney:string | null;
        

    @Column("tinyint",{ 
        nullable:true,
        default: () => "'0'",
        name:"send_type"
        })
    sendType:number | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"min_amount"
        })
    minAmount:string | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"max_amount"
        })
    maxAmount:string | null;
        

    @Column("datetime",{ 
        nullable:true,
        name:"send_start_date"
        })
    sendStartDate:Date | null;
        

    @Column("datetime",{ 
        nullable:true,
        name:"send_end_date"
        })
    sendEndDate:Date | null;
        

    @Column("datetime",{ 
        nullable:true,
        name:"use_start_date"
        })
    useStartDate:Date | null;
        

    @Column("datetime",{ 
        nullable:true,
        name:"use_end_date"
        })
    useEndDate:Date | null;
        

    @Column("decimal",{ 
        nullable:true,
        default: () => "'0.00'",
        scale:2,
        name:"min_goods_amount"
        })
    minGoodsAmount:string | null;
        

    @Column("int",{ 
        nullable:true,
        name:"min_transmit_num"
        })
    minTransmitNum:number | null;
        
}
